<!--{*Part of the CEFIRO project by dyrtech.com.ve. Copyleft GPLv3 2007. Please see the disclaimer at the root of the project: http://dyrtech.com.ve/cefiro/license.txt*}-->

{if $numinstance < 2 && $scripts == "true" }
<script type="text/javascript" src="{$calendarjs}"></script>
<script type="text/javascript" src="{$calendar_esjs}"></script>
<script type="text/javascript" src="{$calendar_setupjs}"></script>
{/if}
<td class="lbl">
  <link type="text/css" rel="stylesheet" href="{$datefieldcss}">
  <link type="text/css" rel="stylesheet" href="{$calendarcss}">
	{$label}
	{if $cad_domain|truncate:3:"" == "A1:" || $cad_domain eq "A1"}
		<span class="lbl-req">*</span>
	{/if}
</td>

<td class='td-input-lbl'>

	<input 	id="{$name}"
			name="{$name}"
			class="input-lbl{if $change}-fecha{/if}"
			type="text"
			value="{$value}"
			size="20"
			readonly
			{$cad_opt}
	>

	<input 	id="d_{$name}"
			name="d_{$name}"
			type="hidden"
			value="{$cad_domain}"
			readonly
	>
	{if $change}
		{$calendar_img}
		{if $scripts == "true"}
		<script type="text/javascript">
			Calendar.showsTime = true;
			{if $readonly_cal == 'false'}
			Calendar.setup (
				{literal}	{	{/literal}
					inputField:"{$name}",
					button:"cal_{$name}",
					{if $time=='true'}
						ifFormat:"%d/%m/%Y %H:%M",
						showsTime:true,
						timeFormat:"24"
					{else}
						ifFormat:"%d/%m/%Y",
						showsTime:false
					{/if}
				{literal}	}	{/literal}
			);
			Calendar.setup (
				{literal}	{	{/literal}
					inputField: "{$name}",
					eventName: "focus",
					button: "{$name}",
					{if $time=='true'}
						ifFormat:"%d/%m/%Y %H:%M",
						showsTime:true,
						timeFormat:"24"
					{else}
						ifFormat:"%d/%m/%Y",
						showsTime:false
					{/if}
				{literal}	}	{/literal}
			);
			{/if}
		</script>
		{/if}
	{/if}
</td>
<td class="msg-validar" id="m_{$name}">
</td>